import http from "@/plugins/axios";

export function getMenuList() {
    const menu = [
        {
            path: '/User',
            name: 'userList',
            meta: {
                title: 'Hello World'
            }
        },
        {
            path: '/Sys',
            name: 'sys',
            meta: {
                title: '系统管理'
            },
            children: [
                {
                    path: '/Sys/Dic',
                    name: 'sysDic',
                    meta: {
                        title: '字典管理'
                    }
                }
            ]
        }
    ]
    return Promise.resolve(menu);
}

export function login(data: { username: string, password: string }) {
    return http.post('/api/dev/login', data);
}

export function getMenu(data: {username: string}) {
    return http.post('/api/dev/menu', data);
}